﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ACP.Data;
using ACP.DTO;

namespace ACP.Business
{
   public class TopicsLogic
    {
        public static void InsertTopic(Topic topic)
        {
            TopicsRepository.InsertTopic(topic);
        }

        public static void UpdatetTopic(Topic topicObject)
        {
            TopicsRepository.UpdatetTopic(topicObject);
        }

        public static Topic GetTopicById(int topicId)
        {
            return TopicsRepository.GetTopicById(topicId);
        }

        public static List<Topic> GetTopicsByParentTopicId(int topicId)
        {
            return TopicsRepository.GetTopicsByParentTopicId(topicId);
        }

        public static List<Topic> GetTopics(System.Linq.Expressions.Expression<Func<Topic, bool>> whereExpression)
        {
            return TopicsRepository.GetTopics(whereExpression);
        }
        public static void InsertSubTopics(List<Topic> lsttopics)
        {
            TopicsRepository.InsertSubTopics(lsttopics);
        }
    }
}
